package aware.util.dao;

import aware.util.dao.oracle.OracleDAOFactory;

public abstract class DAOFactory {

	// List of DAO types supported by the factory

	public static final int ORACLE = 1;

	// There will be a method for each DAO that can be
	// created. The concrete factories will have to
	// implement these methods.
	public abstract UserDAO getUserDAO();

	public abstract UserDAO getSQLStoredProcedureExecutor(
			String procedureNamePattern);

	public abstract SQLStoredProcedureExecutor getSQLStoredProcedureExecutor(String catalog,
			String procedureNamePattern);

	public abstract SQLStoredProcedureExecutor getSQLStoredProcedureExecutor(String catalog,
			String schemaPattern, String procedureNamePattern);

	public static DAOFactory getDAOFactory(int whichFactory) {

		switch (whichFactory) {

		case ORACLE:
			return new OracleDAOFactory();
		default:
			return null;
		}
	}
}